package com.it.park.rms.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.it.park.rms.client.model.Role;
import com.it.park.rms.client.service.RoleService;
import com.it.park.rms.dao.RoleMapper;
import com.it.park.rms.service.impl.base.BaseServiceImpl;

@Service("roleService")
public class RoleServiceImpl extends BaseServiceImpl<Role> implements RoleService{
	
	@Autowired
	private RoleMapper roleMapper;

	@Override
	public boolean insert(Role record) {
		return roleMapper.insert(record) == 1;
	}
	@Override
	public boolean deleteByPrimaryKey(Integer id) {
		return roleMapper.deleteByPrimaryKey(id)==1;
	}
	@Override
	public boolean insertSelective(Role record) {
		return roleMapper.insertSelective(record)==1;
	}
	@Override
	public Role selectByPrimaryKey(Integer id) {
		return roleMapper.selectByPrimaryKey(id);
	}
	@Override
	public boolean updateByPrimaryKeySelective(Role record) {
		return roleMapper.updateByPrimaryKeySelective(record)==1;
	}
	@Override
	public boolean updateByPrimaryKey(Role record) {
		return roleMapper.updateByPrimaryKey(record)==1;
	}
	@Override
	public List<Role> selectAll() {
		return roleMapper.selectAll();
	}
	@Override
	public List<Role> selectPagination(Role t) {
		return roleMapper.selectPagination(t);
	}
	@Override
	public Integer selectTotal(Role t) {
		return roleMapper.selectTotal(t);
	}
	
}
